package com.gopay.common.domain.dps;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import com.gopay.common.domain.BaseEntity;

/**
 * 钱包三充业务订单表
 * @author LEI XIAOBAO
 * @date 2017年5月12日
 */
@Entity
@Table(name="WA_PREPAID_ORDER_DTL")
public class WaPrepaidOrderDtl extends BaseEntity{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * 业务订单id
	 */
	private String orderId;
	
	/**
	 * 国付宝订单号
	 */
	private String gopayOrderId;
	
	/**
	 * 商品id
	 */
	private Integer productId;
	
	/**
	 * 充值类型
	 */
	private String rechargeType;
	
	/**
	 * 商品售价
	 */
	private BigDecimal saleAmt;
	
	/**
	 * 充值金额
	 */
	private BigDecimal rechargeAmt;
	
	/**
	 * 充值状态
	 */
	private int rechargeStatus;
	
	/**
	 * 错误描述
	 */
	private String errMsg;
	
	/**
	 * 创建时间
	 */
	private Date createTs;
	
	/**
	 * 修改时间
	 */
	private Date updateTs;
	
	/**
	 * 乐观锁版本号
	 */
	private int version;
	
	/**
	 * 视频会员卡卡密
	 */
	private String rechargeKey;

	@Id
	@Column(name = "ORDER_ID")
	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	@Column(name = "GOPAY_ORDER_ID")
	public String getGopayOrderId() {
		return gopayOrderId;
	}

	public void setGopayOrderId(String gopayOrderId) {
		this.gopayOrderId = gopayOrderId;
	}

	@Column(name = "PRODUCT_ID")
	public Integer getProductId() {
		return productId;
	}

	public void setProductId(Integer productId) {
		this.productId = productId;
	}

	@Column(name = "RECHARGE_TYPE")
	public String getRechargeType() {
		return rechargeType;
	}

	public void setRechargeType(String rechargeType) {
		this.rechargeType = rechargeType;
	}

	@Column(name = "SALE_AMT")
	public BigDecimal getSaleAmt() {
		return saleAmt;
	}

	public void setSaleAmt(BigDecimal saleAmt) {
		this.saleAmt = saleAmt;
	}

	@Column(name = "RECHARGE_AMT")
	public BigDecimal getRechargeAmt() {
		return rechargeAmt;
	}

	public void setRechargeAmt(BigDecimal rechargeAmt) {
		this.rechargeAmt = rechargeAmt;
	}

	@Column(name = "RECHARGE_STATUS")
	public int getRechargeStatus() {
		return rechargeStatus;
	}

	public void setRechargeStatus(int rechargeStatus) {
		this.rechargeStatus = rechargeStatus;
	}

	@Column(name = "ERR_MSG")
	public String getErrMsg() {
		return errMsg;
	}

	public void setErrMsg(String errMsg) {
		this.errMsg = errMsg;
	}

	@Column(name = "CREATE_TS")
	public Date getCreateTs() {
		return createTs;
	}

	public void setCreateTs(Date createTs) {
		this.createTs = createTs;
	}

	@Column(name = "UPDATE_TS")
	public Date getUpdateTs() {
		return updateTs;
	}

	public void setUpdateTs(Date updateTs) {
		this.updateTs = updateTs;
	}

	@Column(name = "VERSION", nullable = false, precision = 22, scale = 0)
	public int getVersion() {
		return version;
	}

	public void setVersion(int version) {
		this.version = version;
	}
	
	@Column(name = "RECHARGE_KEY")
	public String getRechargeKey() {
		return rechargeKey;
	}

	public void setRechargeKey(String rechargeKey) {
		this.rechargeKey = rechargeKey;
	}
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.DEFAULT_STYLE);
    }
}
